package oj0515.oj0515_03;

import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int i = 1 + n / 2;
        for (int j = i; j <= n ; j++) {
            ArrayList<Integer> path = new ArrayList<>();
            int ci = j;
            while (ci > 0){
                int parent = ci / 2;
                path.add(ci);
                ci = parent;
            }
            for (int k = path.size() - 1; k >= 0 ; k--) {
                System.out.print(path.get(k));
                if (k != 0) System.out.print(" ");
            }
            System.out.println();
        }
        sc.close();
    }

}
